package com.itheima.mapper;

import com.itheima.pojo.OrderSetting;
import org.apache.ibatis.annotations.Select;

import java.util.Date;

public interface UserOrderSettingMapper {
    /**
     * 查询预约表这天是否存在
     * @param orderDate
     */
    @Select("select * from ordersetting where orderDate=#{orderDate}")
    OrderSetting orderSettingExitByOrderDate(Date orderDate);

    /**
     * 查询人数是否满员
     * @param orderDate
     * @return
     */
    @Select("select number,reservations from ordersetting where orderDate=#{orderDate}")
    OrderSetting orderSettingNumberAndReservations(Date orderDate);

    /**
     *更新当天预约人数
     * @param orderSetting
     */
    void updateOrderSetting(OrderSetting orderSetting);
}
